﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace SuperDeepZoom.ImageData
{
    /// <summary>
    /// SubImage metadata source from the DeepZoom metadata file.
    /// </summary>
    public class SubImageMetadata : INotifyPropertyChanged
    {
        int id;
        object context = null;
        string tag;
        string title;
        string blurb;
        string url;
        

        internal SubImageMetadata(int id, string tag)
        {
            this.id = id;
            this.tag = tag;            
        }

        public int Id
        {
            get
            {
                return id;
            }
        }

        public object Context
        {
            get
            {
                return context;
            }
            set
            {
                context = value;
                onPropertyChanged("DisplayCount");
            }
        }

        public string Tag
        {
            get
            {
                return tag;
            }
        }

        public string Title
        {
            get
            {
                return title;
            }
            set
            {
                title = value;
            }
        }

        public string Blurb
        {
            get
            {
                return blurb;
            }
            set
            {
                blurb = value;
            }
        }

        public string Url
        {
            get
            {
                return url;
            }
            set
            {
                url = value;
            }
        }

        #region INotifyPropertyChanged Members

        void onPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}
